import * as func from "./func.js"
import SelectUser from "./components/SelectUser/index.vue"
export default {
  name: '',
  props: {
    height: {
      type: Number,
      default: 300
    },
    value: {
      type: Number,
      default: 300
    },
  },
  components:{
    SelectUser
  },
  data(){
    return {
      content:'',
      visible: false,
      options: [],
      currentAtIdx: 0,
      focusNode: '',
      searchStr:'',
      cursorPosition: {
        x: 0,
        y: 0,
      },
      selected: [],
      atRef:'',
      timer: null,
    }
  },
  methods:{
    ...func,
  },
  computed:{
    cmptParams: function(){
      return {selected: this.selected, content: this.content}
    }
  },
  watch: {
    cmptParams: {
      handler: function(newVal, oldVal) {
        const {selected, content} = this.cmptParams
        const selectUsers = this.getAttrIds();
        // this.onChange(content, selectUsers);
      },
      deep: true, // 监听深层对象
      immediate: false, // 立即执行 
    }
  },
  created(){
    this.fetchOptions()
  },
  mounted(){
    
  },
}